package com.cn.dim.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cn.dim.dao.PositionDao;
import com.cn.dim.pojo.Position;
import com.cn.dim.service.PositionService;
import com.github.pagehelper.PageHelper;
@Service("positionService")
public class PositionServiceImpl implements PositionService {
	@Resource
	PositionDao positionDao;
	
	@Override
	public List<Map<String, Object>> queryPostion(Map<String, Object> m) {
		PageHelper.startPage(Integer.valueOf(m.get("pageIndex").toString()),Integer.valueOf(m.get("pageSize").toString()),true);
		return positionDao.queryPostion(m);
	}

	@Override
	public int insertPosition(Position p) {
		return positionDao.insertPosition(p);
	}
	
	@Override
	public int delPosition(Map<String,Object> m){
		 return positionDao.delPosition(m);
	}

	@Override
	public Position getPositionById(Map<String, Object> m) {
		// TODO Auto-generated method stub
		return positionDao.getPositionById(m);
	}

	@Override
	public int updatePosition(Map<String, Object> m) {
		// TODO Auto-generated method stub
		return positionDao.updatePosition(m);
	}

	@Override
	public List<Map<String, Object>> queryAllPostion(Map<String, Object> m) {
		// TODO Auto-generated method stub
		return positionDao.queryAllPostion(m);
	}

}
